/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package box5;
import java.awt.AWTException;
import java.awt.Robot;
import java.awt.event.KeyEvent;
import java.util.*;
import java.io.*;
/**
 *
 * @author filippo.ambrosi
 */
public class NewClass {
    public static void main(String[] args) throws AWTException {
    Runtime rs =  Runtime.getRuntime();
    try {
        rs.exec("notepad");
    }
    catch (IOException e) {
        System.out.println(e);
                }
    Robot robot = new Robot();
    robot.keyPress(KeyEvent.VK_B);
    robot.keyPress(KeyEvent.VK_E);
    robot.keyPress(KeyEvent.VK_N);
    robot.keyPress(KeyEvent.VK_V);
    robot.keyPress(KeyEvent.VK_E);
    robot.keyPress(KeyEvent.VK_N);
    robot.keyPress(KeyEvent.VK_T);
    robot.keyPress(KeyEvent.VK_O);
    
}   
}
